package com.zhibang.report.controller;





import com.sannuo.common.domain.MonData;
import com.sannuo.common.result.Result;
import com.sannuo.common.result.ResultCode;
import com.zhibang.report.service.MonDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.Date;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@CrossOrigin
@RestController
@RequestMapping("/MonData")
public class MonDataController {
    @Autowired
    private MonDataService monDataService;

    @RequestMapping("nb")
    public Result ss(String csTime){
        System.out.println("谢连环"+csTime);
//        String gh=csTime.substring(0,7);
//        csTime=gh+"%";
        System.out.println("谷瀚"+csTime);
        List<MonData> monData = monDataService.selectData(csTime);
        System.out.print("谷某人"+monData.size());
        return Result.ok(ResultCode.SUCCESS,monData);
    }
}
